<%@ page contentType="text/html;charset=ISO8859_1" language="java" 
 import="git.bankview.sl.report.ReportCommon" %>

<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tld/struts-nested.tld" prefix="nested" %>

<jsp:useBean id="oLogon" class="git.bankview.wl.bean.LogonBean" scope="session" />
<jsp:useBean id="PageTunerForm" type="org.apache.struts.validator.DynaValidatorForm" scope="request" />
<%
	request.setAttribute("request", request);
	java.util.List oAuthMethods = git.bankview.wl.auth.UserAuth.queryMethods(oLogon, "90020");
%>
<jsp:useBean id="oNavigate" class="git.bankview.wl.bean.TransNavigateBean" />
<jsp:setProperty name="oNavigate" property="transid" value="90020" />

<html:html locale="true">
<head>
	<title><logic:iterate id="element" name="oNavigate" property="navigateList"
	><bean:write name="element" property="translabel" />
	 - </logic:iterate><bean:message key="reportschdmonitor.title" /></title>
	<link rel="stylesheet" href="../style/default_aux.css" id="oCssLink">
	<script language="javascript" src="../script/pagetuner.js"></script>
</head>
<body onload="oninit()">
	<script src="/script/overlib.js" language="JavaScript"></script>
	<script src="/script/windows.js" language="JavaScript"></script>
	<table cellspacing="0" class="filledframe">
		<tr>
			<td nowrap="" class="clientframe">
				<table id="oHelp" class="helper" >
					<tr><td>&nbsp;</td><td class="help"><input type="button" class="button" title="<bean:message key="common.help.title" />" onclick="help('help.report.schd');" value="<bean:message key="common.help" />" ></td>
					</tr>
				</table>
				<html:form action="/report/ReportSchdMonitor" styleId="oListForm">
					<logic:notEmpty name="PageTunerForm" property="sortIndexes">
						<logic:iterate id="element" name="PageTunerForm" property="sortIndexes">
							<input type="hidden" name="sortIndexes" value="<bean:write name="element" />" />
						</logic:iterate> 
					</logic:notEmpty>
					<html:hidden property="pageIndex" value="0" />
					<div class="listtitle"><logic:iterate id="element" name="oNavigate" property="navigateList"
						><logic:empty name="element" property="pageurl"><bean:write name="element" property="translabel" /></logic:empty
						><logic:notEmpty name="element" property="pageurl"><a href="<bean:write name="element" property="pageurl" />" title="<bean:write name="element" property="transid" />"><bean:write name="element" property="translabel" /></a></logic:notEmpty
						><img src="/images/navconn.gif" ></logic:iterate><bean:message key="reportschdmonitor.title" 
						/></div>
				
					<table class="tabheader" width="90%" >
						<tr id="oToolBar">
							<td align="left" nowrap=""><bean:message key="common.page" 
								arg0="<%=String.valueOf(PageTunerForm.get("pageIndex"))%>"
								arg1="<%=String.valueOf(PageTunerForm.get("totalPages"))%>"
								arg2="<%=String.valueOf(PageTunerForm.get("totalRows"))%>" /></td>
							<td align="left" nowrap="">&nbsp;</td>
							<td align="right" width="3%" nowrap=""><a href="javascript: oListForm.submit(); "><html:img src="/images/msrefresh.gif" altKey="common.refresh" /></a></td>
							<td align="right" width="3%" nowrap=""><a href="javascript: window.print(); "><html:img src="/images/prints.gif" altKey="common.print" titleKey="common.pageprint.title" /></a></td>
						</tr>
					</table>
					
					<table id="oCube" width="90%" cellspacing="0" class="listpanel">
						<tr class="layer00">
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 1)"><bean:message key="dqreportschd.schdid" /></a> <script>drawSortFlag(oListForm, 1)</script></td>
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 2)"><bean:message key="infotrans.transid" /></a> <script>drawSortFlag(oListForm, 2)</script></td>
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 15)"><bean:message key="infotrans.translabel" /></a> <script>drawSortFlag(oListForm, 15)</script></td>
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 11)"><bean:message key="dqreportschd.grpdeptno" /></a><script>drawSortFlag(oListForm, 11)</script
							>/<a href="javascript:sortBy(oListForm, 13)"><bean:message key="dqreportschd.grpuserid" /></a> <script>drawSortFlag(oListForm, 13)</script></td>
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 12)"><bean:message key="dqreportschd.grpschddate" /></a> <script>drawSortFlag(oListForm, 12)</script></td>
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 4)"><bean:message key="dqreportschd.schdtype" /></a> <script>drawSortFlag(oListForm, 4)</script></td>
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 6)"><bean:message key="dqreportschd.schdstatus" /></a> <script>drawSortFlag(oListForm, 6)</script></td>
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 7)"><bean:message key="dqreportschd.exectime" /></a> <script>drawSortFlag(oListForm, 7)</script></td>
							<td class="typer" nowrap ><a href="javascript:sortBy(oListForm, 8)"><bean:message key="dqreportschd.termtime" /></a> <script>drawSortFlag(oListForm, 8)</script></td>
						</tr>
						<logic:iterate id="element" name="listResult">
						<tr class="layer<bean:write name="element" property="style" />">
							<td class="type1" nowrap ><bean:write name="element" property="schdid" /></td>
							<td class="type0" nowrap ><a href="<bean:write name="element" property="pageurl" />"><bean:write name="element" property="transid" /></a></td>
							<td class="type0" nowrap ><a href="<bean:write name="element" property="pageurl" />"><bean:write name="element" property="translabel" /></a></td>
							<td class="type0" nowrap ><bean:write name="element" property="grpdeptno" />
								<bean:write name="element" property="grpuserid" /></td>
							<td class="type3" nowrap ><bean:write name="element" property="grpschddate" /></td>
							<td class="type0" nowrap >
								<logic:equal name="element" property="schdtype" value="0"><bean:message key="dqreportschd.schdtype.d0" /></logic:equal
								><logic:equal name="element" property="schdtype" value="1"><bean:message key="dqreportschd.schdtype.d1" /></logic:equal
								><logic:equal name="element" property="schdtype" value="5"><bean:message key="dqreportschd.schdtype.d5" /></logic:equal
								><logic:equal name="element" property="schdtype" value="7"><bean:message key="dqreportschd.schdtype.d7" /></logic:equal
								><logic:equal name="element" property="schdtype" value="10"><bean:message key="dqreportschd.schdtype.d10" /></logic:equal
								><logic:equal name="element" property="schdtype" value="15"><bean:message key="dqreportschd.schdtype.d15" /></logic:equal
								><logic:equal name="element" property="schdtype" value="30"><bean:message key="dqreportschd.schdtype.d30" /></logic:equal
								><logic:equal name="element" property="schdtype" value="90"><bean:message key="dqreportschd.schdtype.d90" /></logic:equal
								><logic:equal name="element" property="schdtype" value="180"><bean:message key="dqreportschd.schdtype.d180" /></logic:equal
								><logic:equal name="element" property="schdtype" value="360"><bean:message key="dqreportschd.schdtype.d360" /></logic:equal
								><logic:notEqual name="element" property="grpschduser" value="system">[<a href="#" title="<bean:message key="dqreportschd.grpschduser" />: <bean:write name="element" property="grpschduser" />"><bean:message key="dqreportschd.schdtype.manual" /></a>]</logic:notEqual
								><logic:equal name="element" property="grpschduser" value="system">[<bean:message key="dqreportschd.schdtype.auto" />]</logic:equal>
							</td>
							<td class="type0" nowrap >
								<logic:equal name="element" property="schdstatus" value="0"><bean:message key="dqreportschd.schdstatus.readyToRun" /></logic:equal
								><logic:equal name="element" property="schdstatus" value="1"><bean:message key="dqreportschd.schdstatus.running" /></logic:equal
								><logic:equal name="element" property="schdstatus" value="2"><bean:message key="dqreportschd.schdstatus.ok" /></logic:equal
								><logic:equal name="element" property="schdstatus" value="8"><bean:message key="dqreportschd.schdstatus.readyToDelete" /></logic:equal
								><logic:equal name="element" property="schdstatus" value="9"><bean:message key="dqreportschd.schdstatus.deleted" /></logic:equal
								><logic:lessThan name="element" property="schdstatus" value="0"
								><a href="#" title="<bean:message name="element" property="execmsg" />"><bean:message key="dqreportschd.schdstatus.failed" 
								/></a>(<a href="#" title="<bean:write name="element" property="execdetail_s" />"><bean:write name="element" property="schdstatus" 
								/></a>)</logic:lessThan>
							</td>
							<td class="type3" nowrap ><bean:write name="element" property="exectime" formatKey="common.format.datetime" /></td>
							<td class="type3" nowrap ><bean:write name="element" property="termtime" formatKey="common.format.datetime" /></td>
						</logic:iterate>
					</table>
					<table class="tabfooter" width="90%" >
						<tr>
<%
	boolean bFault = false;
	boolean bReadyToRun = false;
	boolean bRunning = false;
	boolean bOk = false;
	boolean bDeleted = false;
	
	String[] vStatusStr = request.getParameterValues("status");
	for (int i = 0; null != vStatusStr && i < vStatusStr.length; ++i)
	{
		switch(Integer.parseInt(vStatusStr[i]))
		{
			case -1: bFault = true; break;
			case 0: bReadyToRun = true; break;
			case 1: bRunning = true; break;
			case 2: bOk = true; break;
			case 9: bDeleted = true; break;
		}
	}
%>
							<td align="left" nowrap=""><input type="checkbox" name="status" value="-1" <%=bFault ? "checked" : ""%> ><bean:message key="dqreportschd.schdstatus.failed" /></td>
							<td align="left" nowrap=""><input type="checkbox" name="status" value="0" <%=bReadyToRun ? "checked" : ""%> ><bean:message key="dqreportschd.schdstatus.readyToRun" /></td>
							<td align="left" nowrap=""><input type="checkbox" name="status" value="1" <%=bRunning ? "checked" : ""%> ><bean:message key="dqreportschd.schdstatus.running" /></td>
							<td align="left" nowrap=""><input type="checkbox" name="status" value="2" <%=bOk ? "checked" : ""%> ><bean:message key="dqreportschd.schdstatus.ok" /></td>
							<td align="left" nowrap=""><input type="checkbox" name="status" value="9" <%=bDeleted ? "checked" : ""%> ><bean:message key="dqreportschd.schdstatus.deleted" /></td>
							<td align="left" nowrap=""></td>
							<td align="right" width="30%" nowrap="" id="oPageNavigator"></td>
							<td align="right" width="5%" nowrap=""> <bean:message key="common.rowsperpage.prefix" /></td>
							<td align="right" width="2%" nowrap=""><html:text property="rowsPerPage" size="2" /></td>
							<td align="right" width="5%" nowrap=""><bean:message key="common.rowsperpage.postfix" /></td>
						</tr>
					</table>
				</html:form>
			</td>
			<!-- td id="oFrame" nowrap="" class="infoframe" rowspan="2">&nbsp;</td -->
		</tr>
		<tr>
			<td class="clientfooter"><bean:message key="common.lastRefreshAt" arg0="<%=new java.util.Date().toString()%>" /></td>
		</tr>
	</table>

<script language="javascript">
	
function oninit()
{
	var nTotalPages = <bean:write name="PageTunerForm" property="totalPages" />;
	var nPageIndex = <bean:write name="PageTunerForm" property="pageIndex" />;
	
	addPageTuner(oToolBar, oListForm.pageIndex, nPageIndex, nTotalPages);
	addPageNavigator(oPageNavigator, oListForm.pageIndex, nPageIndex, nTotalPages);
}
</script>
<script for="window" event="onbeforeprint">document.all.oCssLink.href = "../style/default_auxp.css";</script>
<script for="window" event="onafterprint">document.all.oCssLink.href = "../style/default_aux.css";</script>
</body>
</html:html>










